
#import "AIMyLibraryBottomShowCell.h"

@implementation AIMyLibraryBottomShowCell
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self createUI];
    }
    return self;
}

- (void)createUI {
    
    self.iconV = [[UIImageView alloc] init];
    [self.contentView addSubview:self.iconV];
    [self.iconV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(20);
        make.centerX.mas_equalTo(self.contentView);
    }];
    
    self.bottomLab = [[UILabel alloc] init];
    self.bottomLab.textColor = [UIColor colorWithHexString:@"#333333"];
    self.bottomLab.font = kFontRegular(13);
    self.bottomLab.textAlignment = NSTextAlignmentCenter;
    self.bottomLab.numberOfLines = 0;
    [self.contentView addSubview:self.bottomLab];
    [self.bottomLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(5);
        make.right.offset(-5);
        make.top.mas_equalTo(self.iconV.mas_bottom).offset(20);
    }];
}

- (void)reloadCellWithImage:(NSString *)imageName title:(NSString *)title {
    self.iconV.image = [UIImage imageNamed:imageName];
    self.bottomLab.text = title;
}
@end
